<script type="text/javascript" src="{DT_PATH}file/script/jquery.js"></script>
{if $action=='products'}
<h1>货品列表</h1>
<div align="center">商品名称：<a href="mall/{$malls['linkurl']}" target="_blank">{$malls['title']}</a>    价格：{$malls['price']}    库存：{$malls['amount']}</div>
<form action="{DT_PATH}goods.php" method="post" name="form" id="form">
<input type="hidden" name="action" value="createproducts" />
<input type="hidden" name="goods_id" value="{$goods_id}" />
<table width="100%" cellpadding="3" cellspacing="1" id="table_list">
   
    <tr>
      {loop $attribute $k $v}
	  	{if $v['attr_name']}
        <td scope="col"><div align="center"><strong>{$v['attr_name']}</strong></div></td>
		{else}
        <td scope="col">&nbsp;</td>
		{/if}
      {/loop}
      <td class="label_2">货号</td>
      <td class="label_2">组合价格</td>
      <td class="label_2">库存</td>
      <td class="label_2">操作</td>
    </tr>

    {loop $product $k $v}
    <tr>
      {loop $v['goods_attr'] $k1 $v1}
      <td scope="col"><div align="center">{$v1}</div></td>
      {/loop}
      <td class="td_1">{$v['product_sn']}</td>
      <td class="td_1">{$v['product_price']}</td>
      <td class="td_1">{$v['product_number']}</td>
      <td><a href="{DT_PATH}goods.php?action=delete&product_id={$v[product_id]}&goods_id={$v[goods_id]}">删除</a></td>
    </tr>
    {/loop}

    <tr id="attr_row">
    {loop $_attribute $attribute_key $attribute_value}
      <td align="center">
        <select name="attr[{$attribute_value[attr_id]}]">
        <option value="" selected>请选择</option>
        {loop $attribute_value['attr_values'] $value}
		<?php
			$str = explode(';',$value);
		?>
        <option value="{$str[0]}">{$str[1]}</option>
        {/loop}
        </select>      </td>
    {/loop}

      <td class="label_2"><input type="text" name="product_sn" value="" size="20"/></td>
      <td class="label_2"><input type="text" name="product_price" value="" size="20"/></td>
      <td class="label_2"><input type="text" name="product_number" value="{$product_number}" size="10"/></td>
      <td><input name="submit" type="submit" class="button" id="submit" value="组合保存" /></td>
    </tr>
    <tr>
      <td align="center" style=" padding-top:20px; color:#FF0000">这里可以类似淘宝的js添加 目前个人做不了</td>
    </tr>
  </table>
</form>
{else}


{/if}
